package owl2vowl.model.entities.nodes.classes;

import owl2vowl.model.SetWithoutNull;
import owl2vowl.model.entities.nodes.AbstractNode;
import owl2vowl.model.entities.nodes.classes.HasDisjointUnion;
import owl2vowl.model.entities.nodes.classes.HasIndividuals;
import java.util.Collections;
import java.util.Set;
import org.semanticweb.owlapi.model.IRI;

public abstract class AbstractClass extends AbstractNode implements HasDisjointUnion, HasIndividuals {
	protected Set<IRI> disjointUnion = new SetWithoutNull();
	protected Set<IRI> instances = new SetWithoutNull();
	protected Set<IRI> individuals = new SetWithoutNull();
	private Set<IRI> keys = new SetWithoutNull();

	protected AbstractClass(IRI iri, String type) {
		super(iri, type);
	}

	public Set<IRI> getDisjointUnion() {
		return this.disjointUnion;
	}

	public void addDisjointUnion(IRI disjointIri) {
		this.disjointUnion.add(disjointIri);
	}

	public void addIndividual(IRI iri) {
		this.individuals.add(iri);
	}

	public Set<IRI> getIndividuals() {
		return Collections.unmodifiableSet(this.individuals);
	}

	public void addInstance(IRI iri) {
		this.instances.add(iri);
	}

	public Set<IRI> getInstances() {
		return Collections.unmodifiableSet(this.instances);
	}

	public Set<IRI> getKeys() {
		return Collections.unmodifiableSet(this.keys);
	}

	public void addKey(IRI keyIri) {
		this.keys.add(keyIri);
	}
}